

<%@ page import="com.pandorasoft.shop.Consumer" %>
<html>

<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta name="layout" content="kickstart" />
	<g:set var="entityName" value="${message(code: 'consumer.label', default: 'Consumer')}" />
	<title><g:message code="default.edit.label" args="[entityName]" /></title>
</head>

<body>

<section id="edit" class="first">

	<g:hasErrors bean="${consumerInstance}">
	<div class="alert alert-error">
		<g:renderErrors bean="${consumerInstance}" as="list" />
	</div>
	</g:hasErrors>

	<g:form method="post" class="form-horizontal" >
		<g:hiddenField name="id" value="${consumerInstance?.id}" />
		<g:hiddenField name="version" value="${consumerInstance?.version}" />
				
						<div class="control-group ${hasErrors(bean: consumerInstance, field: 'accept', 'error')}">
							<label for="accept"><g:message code="consumer.accept.label" default="Accept" /></label>
							<div class="controls">
								<g:textField name="accept" value="${consumerInstance?.accept}" />
								<span class="help-inline">${hasErrors(bean: consumerInstance, field: 'accept', 'error')}</span>
							</div>
						</div>
				
						<div class="control-group ${hasErrors(bean: consumerInstance, field: 'date', 'error')}">
							<label for="date"><g:message code="consumer.date.label" default="Date" /></label>
							<div class="controls">
								<g:datePicker name="date" precision="day" value="${consumerInstance?.date}"  />
								<span class="help-inline">${hasErrors(bean: consumerInstance, field: 'date', 'error')}</span>
							</div>
						</div>
				
						<div class="control-group ${hasErrors(bean: consumerInstance, field: 'name', 'error')}">
							<label for="name"><g:message code="consumer.name.label" default="Name" /></label>
							<div class="controls">
								<g:textField name="name" value="${consumerInstance?.name}" />
								<span class="help-inline">${hasErrors(bean: consumerInstance, field: 'name', 'error')}</span>
							</div>
						</div>
				
						<div class="control-group ${hasErrors(bean: consumerInstance, field: 'phone', 'error')}">
							<label for="phone"><g:message code="consumer.phone.label" default="Phone" /></label>
							<div class="controls">
								<g:textField name="phone" value="${consumerInstance?.phone}" />
								<span class="help-inline">${hasErrors(bean: consumerInstance, field: 'phone', 'error')}</span>
							</div>
						</div>
				
						<div class="control-group ${hasErrors(bean: consumerInstance, field: 'shop', 'error')}">
							<label for="shop"><g:message code="consumer.shop.label" default="Shop" /></label>
							<div class="controls">
								<g:select name="shop.id" from="${com.pandorasoft.shop.Shop.list()}" optionKey="id" value="${consumerInstance?.shop?.id}"  />
								<span class="help-inline">${hasErrors(bean: consumerInstance, field: 'shop', 'error')}</span>
							</div>
						</div>
				
						<div class="control-group ${hasErrors(bean: consumerInstance, field: 'tel', 'error')}">
							<label for="tel"><g:message code="consumer.tel.label" default="Tel" /></label>
							<div class="controls">
								<g:textField name="tel" value="${consumerInstance?.tel}" />
								<span class="help-inline">${hasErrors(bean: consumerInstance, field: 'tel', 'error')}</span>
							</div>
						</div>
				
						<div class="control-group ${hasErrors(bean: consumerInstance, field: 'time', 'error')}">
							<label for="time"><g:message code="consumer.time.label" default="Time" /></label>
							<div class="controls">
								<g:textField name="time" value="${consumerInstance?.time}" />
								<span class="help-inline">${hasErrors(bean: consumerInstance, field: 'time', 'error')}</span>
							</div>
						</div>
				
		<div class="form-actions">
			<g:actionSubmit class="save btn-primary" action="update" value="${message(code: 'default.button.update.label', default: 'Update')}" />
			<g:actionSubmit class="delete btn-danger" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" />
            <button class="btn" type="reset">Cancel</button>
		</div>
	</g:form>

</section>
			
</body>

</html>
